package com.zt.controller;

import com.zt.dto.TransDto;
import com.zt.service.OrdersService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("orders")
public class OrderController {
    @Resource
    private OrdersService ordersService;
    @RequestMapping("create")
    public String create(@RequestBody TransDto transDto) {
        ordersService.create(transDto);
        return "success";
    }
}
